/**
 * @file Settings.h
 * @brief Compile-time constants that can be customized for GDR
 * @author Matt Stallmann @date 18 Dec 2001
 * $Id: Settings.h 10 2007-06-28 20:08:57Z mfms $
 */

/*
 *  Copyright (C) 1989, 2001, 2007  Matthias Stallmann, Prashant Hebbar.
 *  Contact: matt_stallmann@ncsu.edu
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program (file COPYING.txt); if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
 *  USA.
 */

/**
      dimensions for default font -- used for everything except
       programmer-defined message windows and vertex and edge labels 
       (the default font should not be changed without extreme care
       -- dimensions of the menu and panel depend on it; in any case, it
       should be a fixed-pitch font)
 **/
#define FONT  "10x20"            /* default font */
#define CH_W	10               /**< character width-pixels */
#define CH_H   20               /**< character height-pixels */
#define HPAD    4               /**< horizontal padding */
#define VPAD    4               /**< vertical padding */

/* default window geometry */
#define WINDOW_COLUMNS 75       /**< number of characters for window width */
#define WINDOW_ROWS 25          /**< number of characters for window height */
#define WIN_WID (WINDOW_COLUMNS * CH_W) /**< main canvas width */
#define WIN_HYT (WINDOW_ROWS * CH_H)    /**< main canvas height */
#define WIN_X     5             /**< x-coordinate of main window */
#define WIN_Y     5             /**< y-coordinate of main window */
#define WINDOW_BORDER_WIDTH 4   /**< default border width for the main
                                   windows */

/* the following dimensions are used to create the backup pixmap */
#define MAX_DISPLAY_WIDTH 2048	/**< maximum possible display width */
#define MAX_DISPLAY_HEIGHT 2048	/**< maximum possible display height */

/* hard-coded limits */
#ifndef MAX_VERTEX
/** The maximum number of vertices allowed (currently, if MAX_VERTEX > 100,
    only the last two digits of id's will be printed) */
#define MAX_VERTEX 100
/** Maximum length of the string representing a vertex number (not
    universally used yet) */
#define MAX_VERTEX_STRING_LENGTH 2
#endif

#define KEY_PRESS_LENGTH 3      /**< maximum length of string for a key press
                                   event */
#define LINE_LENGTH 80          /**< length used for labels, title bar, and
                                   responses to queries */
#define MESSAGE_LENGTH 1000     /**< maximum length of an error message */
#define MAX_TEXT_WINDOWS 100    /**< maximum number of programmer-defined
                                   text windows */

/* vertex and edge geometry */
#define VX_B  2                 /**< width of vertex border */
#define VX_R (2 * CH_W > CH_H ? 2 * CH_W : CH_H)
/**< radius of the vertex */

#define RAD	20                  /**< distance between two parallel edges */
#define ARROW_LENGTH 15         /**< length of arrow for directed edges */
#define ARROW_ANGLE 0.4         /**< angular 1/2-width of arrows in radians */
#define ARROW_EXPANSION 1.414   /**< expansion factor for arrow in
                                   highlighted mode (to make it visible) */
#define EDGE_THICKNESS 1        /**< thickness of unhighlighted edges */
#define HIGHLIGHT_THICKNESS 4   /**< thickness of highlighted edges */
#define EPS 4                   /**< error margin for edge selection */

/* customizing display and animation */
#define BLINK_RATIO 1           /**< ratio between delay for vertex vs. edge
                                   blink */
#define BLINK_DELAY 150000      /**< delay of a standard blink, in
                                   microseconds */

/*     other fonts: for each font, need to specify horizontal and
       vertical padding, the amount of blank space to be added on each
       side of a line of text */

/* Note: an unavailable font causes a BadName error with Major code 45.
   To find out what fonts are available on your display, do xlsfonts.
   Sometimes, rather than using the full name of a font it's possible to
   use a filename in /usr/lib/X11/fonts/75dpi with the .snf extension
   removed */

/** vertex label font */
#define VLAB_FONT "10x20"        /* use large size, e.g. "10x20", for demos */
/*  "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1" */
#define VLAB_HPAD 2             /**< horizontal padding for vertex labels */
#define VLAB_VPAD 2             /**< vertical padding for vertex labels */
#define VLAB_BORDER_WIDTH 2     /**< border width of vertex label window */

/** edge label font */
#define ELAB_FONT "10x20"
/*  "-adobe-helvetica-medium-o-normal--12-120-75-75-p-67-iso8859-1" */
#define ELAB_HPAD 2             /**< horizontal padding for edge labels */
#define ELAB_VPAD 2             /**< vertical padding for edge labels */
#define ELAB_BORDER_WIDTH 1     /**< border width of edge label window */

/** message font */
#define MSG_FONT "10x20"
/*  "-adobe-courier-medium-r-normal--12-120-75-75-m-70-iso8859-1" */
#define MSG_HPAD 5              /**< horizontal padding for messages */
#define MSG_VPAD 2              /**< vertical padding for messages */
#define MSG_BORDER_WIDTH 2      /**< border width of message window */

/* position of RESUME window */
#define RES_LEFT (strlen(" RESUME ? ") * CH_W + 10)
                                /**< distance from left of resume window to
                                   right boundary */
#define RES_UP   (2 * CH_H + 5)   /**< distance from top of resume window to
                                   bottom boundary */

/* panel geometry */
#define PANEL_HPAD 5
#define PANEL_VPAD 5
#define Y_P	(CH_H + PANEL_VPAD) /**< height of a panel rectangle */
#define PANEL_WIDTH	(strlen("CREATE VERTEX") * CH_W + 2 * PANEL_HPAD)
                                /**< width of the panel */
#define HELP_WIDTH WIN_WID      /**< width of help message area */
#define HELP_HEIGHT (CH_H + 2 * VPAD) /**< height of help message area */

/* query window geometry */
  /** margins within which query window should appear */
#define Q_LEFT_MARGIN 5
#define Q_RIGHT_MARGIN 50
#define Q_TOP_MARGIN 10
#define Q_BOTTOM_MARGIN 10
#define Q_HPAD 8                /**< indentation for query response */

/* popup menu geometry */
#define M_HPAD 8                /**< horizontal padding in menu */
#define MW (strlen("RUN ANIMATION") * CH_W + 2 * M_HPAD)
/**< menu window width */
#define MB 2                    /**< width of menu border */

/* end of Settings.h **/

/*  [Last modified: 2007 06 28 at 19:27:51 GMT] */
